import java.sql.Connection;
import java.sql.PreparedStatement;

//删除部门信息
public class Demo03 {
    public static void main(String[] args) throws Exception {
         //1.搭桥 开门
        Connection conn = DBHelper.getConn();
        //2. sql
        String sql="DELETE FROM `dept` WHERE `did` = ?";
        //3. 创建仓库管理员
        PreparedStatement ps = conn.prepareStatement(sql);
        //4.给？赋值
        ps.setInt(1,8);
        //5.执行sql
        ps.executeUpdate();
        //6.关门
        DBHelper.close(ps,conn);

    }
}
